﻿<?php
require_once "config.php";
require_once "dbconfig.php";
$tab = "share";
require_once "tab.inc.php";
$url = "http://api.xiaonei.com/restserver.do?format=JSON&api_key=".$apiKey
		."&method=xiaonei.users.getInfo&session_key=".urlencode($sk)
		."&v=1.0&fields=name,sex&uids=".$uid;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$rt = curl_exec($ch);
curl_close($ch);
$temp = htmlspecialchars($rt);
$xmlHelper = new XMLHelper($temp);
$userName = $xmlHelper->getXMLNodeValue("name",false);
$uidSex = $xmlHelper->getXMLNodeValue("sex",false);
?>


<div style="width:518px;height:auto;margin:10px auto 10px auto;
   background:url(<?php echo $_ENV['imgUrl'];?>/recommend-md_m1.gif) repeat-y center top;">
  <div style="height:auto;
	background:url(<?php echo $_ENV['imgUrl'];?>/recommend-bt_m1.gif) no-repeat center bottom;">
    <div style="padding:25px;height:auto;background:url(<?php echo $_ENV['imgUrl'];?>/recommend-tp_m1.gif) no-repeat center top;">
       <h1 style="font-size:14px;font-weight:bold;height:25px;margin-bottom:10px;color:#F3A;">分享是一种境界---我的瘦身计划</h1>
		<form action="share.php" id="body_form" method="post">
		  <input type="hidden" name="method" value="insert"/>
		  <input type="hidden" name="outId" value="<?php echo $uid;?>"/>
		  <input type="hidden" name="status" value="1"/>
		  <input type="hidden" name="sex" value="<?php echo $uidSex;?>"/>
		  <input type="hidden" name="userName" value="<?php echo $userName;?>"/>
		  <p style="padding-left:10px;">
			主题：<textarea class="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';" name="title" style="width:400px; height:15px;"></textarea>
		  </p>
		  <h1 style="font-size:14px;font-weight:bold;height:25px;margin-bottom:2px;">饮食计划：</h1>
		  <p style="padding-left:10px">
			 早餐：<textarea class="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';" name="dietPlanMorning" style="width:400px; height:30px;"></textarea>
		  </p>
		  <p style="padding-left:10px;">
			 中餐：<textarea class="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';" name="dietPlanNoon" style="width:400px; height:30px;"></textarea>
		  </p>
		  <p style="padding-left:10px;">
			 晚餐：<textarea class="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';" name="dietPlanNight" style="width:400px; height:30px;"></textarea>
		  </p>
		  <h1 style="font-size:14px;font-weight:bold;height:25px;margin-bottom:2px;">运动计划：</h1>
		  <p style="padding-left:10px;">&nbsp;&nbsp;&nbsp;&nbsp;
			 <textarea class="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';" name="sportsPlan" style="width:400px; height:60px;"></textarea>
		  </p>
		  <!--<p style="padding-left:10px;">
			 中午：<textarea class="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';" name="sportsPlanNoon" style="width:400px; height:30px;"></textarea>
		  </p>
		  <p style="padding-left:10px;">
			 晚上：<textarea class="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';" name="sportsPlanNight" style="width:400px; height:30px;"></textarea>
		  </p>-->
		  <h1 style="font-size:14px;font-weight:bold;height:25px;margin-bottom:2px;">附加说明：</h1>
		  <p style="padding-left:10px;">&nbsp;&nbsp;&nbsp;&nbsp;
		  <textarea style="border:1px solid #7F9DB9;width:99.5%;line-height:21px;border:0;overflow:auto;color:#444;font-size:12px;font-family:Verdana,'宋体';"  name="memo" style="width:400px; height:50px;"></textarea></p>
		  <p style="text-align:center !important;">
		      <input type="submit" style="width:80px;height:25px;border:none;padding-top:3px;font-weight:bold;font-size:12px;color:#FFF;cursor:pointer;background:url(<?php echo $_ENV['imgUrl'];?>/main-btn.gif) no-repeat center top;" name="share"  value="分享">&nbsp;&nbsp;&nbsp;&nbsp;<a href='share.php'>返回</a></p>
		  </form>
	</div>	
  </div>
</div>
<?php 
	mysql_close();
?>	






